{include file="public/header" /}

<div class="container" style="overflow: hidden">
	<div class="container mtb-15" style="background: #FFF;padding: 15px;border-radius: 3px;width: initial">
		<div class="row">
			<div class="container">
				<ul class="search-category nav nav-pills">
					<li class="{$action_name == 'question' ? 'active' : ''}">
						<a href="{:url('Search/question')}?keyword={$keyword}">问答</a>
					</li>
					<li class="{$action_name == 'article' ? 'active' : ''}">
						<a href="{:url('Search/article')}?keyword={$keyword}">文章</a>
					</li>
					<li class="{$action_name == 'user' ? 'active' : ''}">
						<a href="{:url('Search/user')}?keyword={$keyword}">用户</a>
					</li>
				</ul>
				<form action="{:url('Search/' . $action_name)}" class="row" method="get" novalidate="true">
					<div class="col-md-9">
						<input class="input-lg form-control" type="text" name="keyword" value="{$keyword}" placeholder="输入关键字搜索"></div>
					<div class="col-md-2">
						<button type="submit" class="btn btn-primary btn-lg btn-block">搜索</button>
					</div>
				</form>
			</div>
		</div>
		<div class="row">
			<div class="col-md-9 main search-result">
				<h3 class="h5">
					找到约 <strong>{$list->total()}</strong> 条结果
				</h3>
				{volist name="list" id="rs"}
					<section class="widget-item">
						<h2 class="h4">
							<a href="{:url($module_name . '/detail', array($field_key => $rs[$field_key]))}" target="_blank">
								{:search_replace($rs['title'])}
							</a>
						</h2>
						<p class="excerpt">
							{:search_replace($rs['content'], $keyword, 300)}
						</p>
					</section>
				{/volist}
				<div class="text-center">
					{$page}
				</div>
			</div>
			<div class="col-md-3 side"></div>
		</div>
	</div>
</div>

{include file="public/footer" /}